<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>老师端考试信息界面</title>
  <link rel="stylesheet" href="../layui/css/layui.css">
</head>

<body class="layui-layout-body">
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-cyan">
      <div class="layui-logo"><img src="../img/hnzyy.png" alt=""></div>
    
      <div style="text-align: center;color: white;font-size: 28px;line-height: 70px;">
        学生管理系统
      </div>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <a href="javascript:;">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            aimee 201701
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">基本资料</a></dd>
            <dd><a href="">安全设置</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="">退出</a></li>
      </ul>
    </div>
    <!-- style="background-color: rgb(70, 83, 100);" -->
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree layui-bg-black" lay-filter="test">
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="lunbo?m=find" target="mytarget">首页</a>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">学生管理</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">学生信息</a></dd>
              <dd><a href="javascript:;">学生考勤</a></dd>
              <dd><a href="javascript:;">学情警示</a></dd>
              <!-- <dd><a href="">超链接</a></dd> -->
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;">考试管理</a>
            <dl class="layui-nav-child">
			 <dd><a href="./createexam.jsp" target="mytarget">考试管理</a></dd>
                       <dd><a href="./questions.jsp" target="mytarget">题目管理</a></dd>
                        <dd><a href="./course.jsp" target="mytarget">科目管理</a></dd>
              <dd><a href="http://localhost:8080/OnlineExam/admin/exampaper.jsp" target="mytarget">试卷管理</a></dd>
            </dl>
          </li>
         
          <li class="layui-nav-item">
            <a href="javascript:;">成绩管理</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">成绩登记</a></dd>
              <dd><a href="javascript:;">成绩查看</a></dd>
              <!-- <dd><a href="">超链接</a></dd> -->
            </dl>
          </li>

    

          <li class="layui-nav-item">
            <a href="javascript:;">留言板</a>
            <dl class="layui-nav-child">
              <dd><a href="http://localhost:8080/OnlineExam/admin/leaveword?m=findLeaveword" target="mytarget">全部留言</a></dd>
              <dd><a href="http://localhost:8080/OnlineExam/admin/myLeave.jsp" target="mytarget">我的留言</a></dd>
            </dl>
          </li>

          <li class="layui-nav-item">
            <a href="lunbo?m=page" target="mytarget">公告栏管理</a>
          </li>
        </ul>
      </div>
    </div>

    <div class="layui-body">
      <!-- 内容主体区域 -->
      <div style="padding: 15px;">
        <iframe src="lunbo?m=find" name="mytarget" style="display:block;width:100%;height:800px" frameborder="0" scrolling="yes"></iframe>
      </div>
    </div>
<%--    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © layui.com - 底部固定区域
    </div>--%>
  </div>

</body>
<script src="../layui/layui.js"></script>
<script>
  //JavaScript代码区域
  layui.use('element', function () {
    var $ = layui.jquery,
            element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

    //触发事件
    //增加前进行判断
    $('.add').on('click',function(){
      var aobj=$(this);
      var id=aobj.attr("lay_id");
      var ids = $(".layui-tab-title li[lay-id]");
      var find = true;
      for (var i = 0; i < ids.length; i++) {
        if ($(ids[i]).attr("lay-id") == 55) {
          find = false;
          console.log(find);
          break;
        }
      }
      if (find == true) {
        element.tabAdd('demo', {
          title: '订单管理',
          content: '订单管理'
        })
      } else {
        element.tabChange('demo', '55');
      }
    })
    var active = {
      tabDelete: function (othis) {
        //删除指定Tab项
        element.tabDelete('demo', '44'); //删除：“商品管理”


        othis.addClass('layui-btn-disabled');
      },
      tabChange: function () {
        //切换到指定Tab项
        element.tabChange('demo', '22'); //切换到：用户管理
      },
      tabDeleteAll: function () {
        //删除所有
        var ids = $(".layui-tab-title li[lay-id]");
        console.log("del all..." + ids.length);
        $.each(ids, function (i, item) {
          console.log(i + "--" + item);
          var layid = $(item).attr("lay-id");
          element.tabDelete("demo", layid);
        })
      }
    };

    $('.site-demo-active').on('click', function () {
      var othis = $(this),
              type = othis.data('type');
      active[type] ? active[type].call(this, othis) : '';
    });

    $(function () {
      $("#main_left a").on("click", function () {
        var address = $(this).attr("href");
        $("iframe").attr("src", address);
      });
    });

  });
</script>
</html>